Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the migueleliasweb/go-github-mock dependency and replaces it with an in-house HTTP handler-map based mocking approach using testify for assertions. The change simplifies the testing infrastructure while maintaining all existing test functionality.
Key Changes:
- Removed
go-github-mockand its transitive dependencies (gorilla/mux, golang.org/x/time/rate) - Introduced new mocking infrastructure using HTTP handler maps (
MockHTTPClientWithHandlers) - Updated all test files to use the new mocking approach
- Updated license files and documentation to reflect dependency removals
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod / go.sum | Removed migueleliasweb/go-github-mock and transitive dependencies (gorilla/mux, go-github/v71, golang.org/x/time) |
| third-party/**/LICENSE | Removed license files for removed dependencies |
| third-party-licenses.*.md | Updated to remove references to removed dependencies |
| pkg/github/mock_shim_test.go | New file implementing compatibility shim for legacy test patterns with handler-map based mocking |
| pkg/github/helper_test.go | Added endpoint constants for Projects V2 API, renamed testify/mock import to avoid collision |
| pkg/raw/raw_mock.go | Changed endpoint patterns from structs to string constants |
| pkg/github/*_test.go | Updated all test files to use new MockHTTPClientWithHandlers approach |
| docs/testing.md | Updated testing documentation to reference new HTTP handler-map helpers |
| .github/copilot-instructions.md | Updated instructions to document new mocking approach |
scutuatua-crypto
approved these changes
Dec 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove
migueleliasweb/go-github-mockand use testify for mocksWhy
Fixes #1492
MCP impact
Security / limits
Lint & tests
./script/lint./script/testDocs